<extend name="Public/base" />
<block name="content">
<!-- 配置文件 -->
<script type="text/javascript" src="__STATIC__/ueditor/ueditor.config.all.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__STATIC__/ueditor/ueditor.all.min.js"></script>
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a class="tip-bottom" href="{:U('Index/index')}" data-original-title="首页"><i class="icon-home"></i> 首页</a>
			<a class="tip-bottom" href="{:U('OnlineExpo/onePageList')}" data-original-title="">{$meta_title_c}</a> 
			<a class="current" href="{$post_url}">{$meta_title}</a>
		</div>
	</div>
	<div class="container-fluid">
		<br/>
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"> <i class="icon-align-justify"></i></span>
						<h5>{$meta_title}</h5>
					</div>
					<div class="widget-content nopadding">
						<form class="form-horizontal" method="post" action="">
							<div class="control-group">
								<label class="control-label">功能页名称:</label>
								<div class="controls">
									<input type="text" placeholder="功能页名称1-20个字符" class="ui-wizard-content span4" maxlength="20" name="page_name" value="{$list.page_name|htmlspecialchars}" >
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">功能页地址:</label>
								<div class="controls">
									<input type="text" placeholder="功能页地址1-100个字符" class="ui-wizard-content span7" maxlength="100" name="page_place" value="{$list.page_place|htmlspecialchars}" >
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">功能面介绍:</label>
								<div class="controls">
									<textarea class="span7" maxlength="200" placeholder="功能页介绍1-200个字符" name="page_des">{$list.page_des|htmlspecialchars}</textarea>
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label">功能页信息:</label>
								<div class="controls">
									<!-- 加载编辑器的容器 -->
								    <textarea id="container" name="page_content" type="text/plain">{$list.page_content}</textarea>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">排 序 :</label>
								<div class="controls">
									<input type="text" placeholder="排序为数字" class="ui-wizard-content span2" maxlength="5" name="sort" value='{$list.sort|htmlspecialchars}' >
								</div>
							</div>
							<div class="form-actions">
								<button class="btn btn-success" type="submit">提交</button>
							</div>
							<input type="hidden" name="page_id" value="{$list.page_id}"/>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">

$(function(){
	//ueditor
	var ue = UE.getEditor('container',{
	    allowDivTransToP: false,
	    initialFrameWidth:600,
	    initialFrameHeight: 300,
	    toolbars: [
			['fullscreen', 'source', 'undo', 'redo', 'bold', 'italic', 'underline', 'fontborder', 'backcolor', 'fontsize', 'fontfamily', 'justifyleft', 'justifyright', 'justifycenter', 'justifyjustify', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', 'link', 'unlink','simpleupload','insertimage']
		]
	});
});

$(document).ready(function(){
	
	$("form").submit(function(){
		//锁定登录按钮
		$('button').attr('disabled',true);
		var self = $(this);
		$.post("{$post_url}", self.serialize(), call_back, "json");
		return false;
		
		/**
		 * @todo 接收登录返回值
		 * @author PHP@妖孽 <dino_ma@163.com>
		 */
		function call_back(data){
			if(data.status==1){
				tke_alert(data.info,'alert-success');
				setTimeout(function(){
				  if (data.url) {
						location.href=data.url;
					}else{
						location.reload();
					}
				},1500);
			} else {
				$('button').attr('disabled',false);
				tke_alert(data.info,'alert-error');
			}
		}
	});
	//导航高亮
	highlight_subnav("{:U('OnlineExpo/onePageList')}");
});
</script>
</block>